﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.IO;


namespace AnaGiftedProject
{
    public partial class profile : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        { 
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            using (DatabaseGiftedEntities ctx = new DatabaseGiftedEntities())
            {
                Blog bg = new Blog
                {
                    UserId = 1,
                    Subject = txtName.Text,
                    Body = txtBody.Text,
                };
                ctx.AddToBlogs(bg);
                ctx.SaveChanges();
                ListView1.DataBind();
            }
        }
    }

    }
